/**
 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2023. All rights reserved.
 *
 * Description: Application core main function for standard \n
 *
 * History: \n
 * 2022-07-27, Create file. \n
 */


#ifndef WIFI_CONNECT_H
#define WIFI_CONNECT_H

#include <stdint.h>
#include "sle_errcode.h"
#include "errcode.h"

#define USE_NameAndPass                  0                           //更改为1时，需要在85-86行填写
#define ADDRESS                 "tcp://119.91.109.180:9501"          //更换为自己的MQTT服务端网址和端口
#define CLIENTID                "72855a17986247909c0b5154aa1a7cb0"   //根据MQTT服务端需要填写
#define TOPIC1                   "substopic"                          //需要订阅的Topic
#define TOPIC2                   "control"                          //需要订阅的Topic
#define PAYLOAD                 "Hello World!"                       //需要发送的消息
#define QOS                             0                            //QOS等级，根据MQTT服务端要求填写
#define TIMEOUT                       10000L


int wifi_connect(const char *ssid, const char *psk);
int mqtt_publish(const char *topic, char* msg);
errcode_t example_sle_server_send_notify_by_handle(const uint8_t *data, uint8_t len);
extern char Receive_data[256];
extern char Send_data[256];

#endif